<?php
return [
    'resource'      => [
        'prefix'                => 'http://'. API_DOMAIN.'/resource?p=', // 获取图片地址的前缀 用于：编辑器内的图片上传后获取url、前台显示图片url
    ],
    // 允许API请求的来源域名
    'apiAllowOrigin' => [
        'http://localhost:8080','http://localhost:8081','http://localhost:8082','http://localhost:8083','http://localhost:8084',
    ],
    'number_paginate' => 20,
//    'org_managed_max' => 1, // 用户可以拥有最高组织的最多组织数量 0 表示不限制
//    'org_joined_max' => 5, // 用户可以加入最多组织数量 0 表示不限制

    // 验证规则:
    'validate'      => [
        'username'              => 'required|digits:11|unique:users', // 注册时的验证
        'username_check'        => 'required|digits:11', // 除了注册外的账号验证
        'password'              => 'required|min:6|max:16',
        'member_name'           => 'required|min:2|max:50', // 顾客名
        'organization'          => 'required|min:4|max:50|unique:organizations',
        'member_mobile'         => 'required|mobile',
    ],
    // 组织设置字段
    'org_setting_field' => ['can_join','order_auto_pass'],
    // 模型状态status，可以通过getStatusText获取文字:
    'status'        => [
        'switch'                => [ 1=>'正常' , 0=>'停用' ],
        'is_yes'                => [ 0=>'否', 1=>'是' ],
        'married'               => [ 0=>'未婚', 1=>'已婚' ],
        'used'                  => [ 1=>'已用', 0=>'未用' ],
        'user'                  => [ 1=>'在职', 0=>'离职' ],
        'member_pool'           => [ 0=>'未入学', 1=>'已入学' ],
        'can_join'              => [ 0=>'禁止加入', 1=>'可加入' ],
        'material'              => [ 0=>'报单审核中', 1=>'出库中', 2=>'已出库', -1=>'被驳回' , 9=>'已入库'],
        'applicant'             => [ 0=>'申请中', 1=>'已审核', -1=>'被驳回'],
        'invitation'            => [ 0=>'邀请中', 1=>'已同意', -1=>'被驳回' ],
        'pay_type'              => [ 'wxpay'=>'微信付款', 'offline'=>'线下付款'],
                                // 已报名，为member自行报名，如果报名有顾问，则自动选择顾问，若没有顾问，需要后台通过划客户分配顾问
                                // 已提单，为user操作成单上报
                                // 已认款，为财务人员负责审核款项是否准确
                                // 已成交，为认款并审核完毕
                                // 已驳回，为审核失败，需要user重新提单
//        'order'                 => [ 0 =>'已报名', 1 =>'已提单', 5 =>'认款审核中', 6 =>'已成单', -1 =>'审核失败'],
        'order'                 => [ 0 =>'未付款', 1 =>'已付款', 9=>'退款单', -1 =>'已取消', -2 => '支付失败'],
        'refund'                => [ 0 =>'退款中', 1 =>'退款已审', 2=> '退款完成', -1=>'退款失败'],
        'order_type'            => [ 1 =>'团体课订单', 2 =>'一对一课订单', 3 =>'商品订单' ],
        'product_type'          => [ 1 =>'团体课', 2 =>'一对一'], // 需要和order_type对应
        'product'               => [ 1 =>'上架', 0 =>'下架'],
        'gift_order'            => [ 1 =>'已兑换', 0 =>'申请中', -1 =>'已取消' ],
        'morph_names'           => [ 'Order' => '课程订单', 'Product' => '团体课订单', 'Course' => '课时', 'Goods' => '商品订单' ], //'OrderU' => '报单', 'ProceedsReceivableU' => '收款'
        'proceeds_money'        => [ 0 =>'未付款', 1 =>'已付款' , 2 =>'已认款' ],
        'menu_position'         => [ 1 =>'左侧菜单', 2 =>'下拉菜单', 3=>'跳转菜单'],
        'industry'              => [ 0 =>'其他', 1 =>'学生',2=>'互联网',3=>'生活服务',4=>'金融',5=>'农林牧渔',6=>'机械'],
        'occupation'            => [ 0 =>'学生',1 =>'管理人员',2 =>'公司职员',3 =>'自由职业',4 =>'其他'],
        'source'                => [ 0 =>'其他', 1 =>'官方网站',2=>'百度搜索',3=>'其他搜索引擎',4=>'朋友介绍',5=>'电话来访',6=>'纸质广告',7=>'站牌广告',8=>'电视广告'],
        'course'                => [ 0 =>'已停课', 1 =>'正常'],
        'course_sign'           => [ 0 =>'未签到', 1 =>'已签到', 2 =>'已请假'],
        'gender'                => [ 0 =>'未知', 1 =>'男', 2 =>'女'],
        'education'             => [ 0 =>'高中及以下', 1 =>'专科', 2 =>'本科', 3 =>'硕士', 4 =>'博士'],
        'organization'          => [ 0 =>'关停', 1 =>'正常', -1 =>'审核中' , -2 => '驳回申请'],
        'org_type'              => [ 1 => "中小型培训机构", 2 => "培训公司", 3 => "职业教育集团", 4 => "高校专业院系组织", 5 => "海外机构在华办学组织", 6 => "政府下属行政事业单位", 7 => "企业内部培训组织", 10 => "其他"],
        'org_target'            => [ 1 => "学前", 2 => "小学", 3 => "中学", 4 => "专科", 5 => "大学", 6 => "留学", 7 => "成人", 8 => "老年人", 10 => "其他"],
        'org_major'             => [ 1 => "课外辅导", 2 => "外国语", 3 => "艺术", 4 => "体育", 5 => "专业技能", 10 => "其他" ],
        'sign_limit'            => [ 0 => '提前半小时签到（默认）', 1 => '提前1小时签到', 2 => '提前2小时签到', 3 => '当天的课都可签到' ],
        'payment'               => [ 'cash' => '现金', 'wxpay'=>'微信', 'alipay'=>'支付宝', 'transfer'=> '汇款', 'check' => '支票', 'other' =>'其他'],
        'course_homework'       => [ 0 => '无作业', 1=>'有作业'], // 2=>'已交作业'
        'pay_log'               => [ 1 => '订单支付', 2 => '充值'],
        'balance_log'           => [ 1 => '余额支付订单', 2 => '充值'],
        'pay'                   => [ 0 => '已支付', 1 => '未支付', -2 => '支付失败'],
        'adv'                   => [ 'home' => '首页', 'divisions' => '门店页顶部', 'goods' => '商城顶部'],
        'time_stage'            => [ 1 => ['06:00','09:00'], 2 => ['09:00','12:00'], 3 => ['12:00','14:00' ], 4 => ['14:00','18:00'], 5 => ['18:00','22:30']],
        'red_packet'            => [ 0 => '未过期', 1 => '已过期'],
        'red_packet_stage'       => [ 'share' => '分享转发获得', 'order' => '订单消费'],
    ],
    'upload'        => [
//        "path"                  => "/upload/",
        "imagePath"             => "/upload/" . API_PREFIX. '/img/',
        "imageValidate"         => "required|image|mimetypes:image/jpeg,image/png,image/bmp,image/gif|max:2048", /* 允许图片格式 */
    ],
];
